Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script> function formSubmit() { document.forms["myForm"].submit(); } </script> </head> <body> <form name="myForm" action="http://www.w3schools.com/tags/form_submit.asp" method="get"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br><br> <input type="button" onclick="formSubmit()" value="Send form data!"> </form> <p>Notice that the JavaScript in the head section uses the name of the form to specify which form to submit.</p> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml_form_name by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:23:26 GMT --> </html>
Result:
Try it Yourself - © w3schools.com